package com.xq.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @Author: xiaoqiang
 * @Description:
 * @Date: 2021/5/29
 * @Version: 1.0
 */
public interface SqlSession {

    /**
     * 查询所有
     * @param statementid
     * @param param 查询参数
     * @param <E>
     * @return
     */
   <E> List<E> selectList(String statementid, Object...param) throws IllegalAccessException, ClassNotFoundException, IntrospectionException, InstantiationException, SQLException, InvocationTargetException, NoSuchFieldException;

    /**
     * 查询单个信息
     * @param statementid
     * @param param
     * @param <E>
     * @return
     */
   <E> E selectOne(String statementid, Object...param) throws IllegalAccessException, IntrospectionException, InstantiationException, NoSuchFieldException, SQLException, InvocationTargetException, ClassNotFoundException;

    /**
     * 为Dao接口生成代理实现类
     * @param mapperClass
     * @param <T>
     * @return
     */
   <T> T getMapper(Class<?> mapperClass);

}

